include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.10.6
-PKG_RELEASE:=2
+PKG_VERSION:=4.9.11
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-only
http://samba.mirror.bit.nl/samba/ftp/stable/ \
https://download.samba.org/pub/samba/stable/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=9efbeb52db1203dc779b118f1c48c161e569f7a6af5101e745497ee6296eef42
+PKG_HASH:=bb736624d16f7369e395de2f15fec153b554f76f95864015b4ce1f2ae53e817b
# samba4=(asn1_compile) e2fsprogs=(compile_et) nfs-kernel-server=(rpcgen)
-HOST_BUILD_DEPENDS:=python3/host nfs-kernel-server/host e2fsprogs/host
+HOST_BUILD_DEPENDS:=nfs-kernel-server/host e2fsprogs/host
PKG_BUILD_DEPENDS:=samba4/host
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_kmod-fs-xfs
include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
define Package/samba4-libs
$(call Package/samba4/Default)
TITLE+= libs
- DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libtasn1 +libopenssl +libreadline \
+ DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libreadline \
+PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
+SAMBA4_SERVER_VFS:attr \
+SAMBA4_SERVER_ACL:acl +SAMBA4_SERVER_ACL:attr \
+SAMBA4_SERVER_AVAHI:libavahi-client \
- +SAMBA4_SERVER_AD_DC:python3-base +SAMBA4_SERVER_AD_DC:python3-crypto +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
+ +SAMBA4_SERVER_AD_DC:python-base +SAMBA4_SERVER_AD_DC:python-crypto +SAMBA4_SERVER_AD_DC:libopenssl +SAMBA4_SERVER_AD_DC:libgnutls +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive
endef
define Package/samba4-server
--without-gpgme
HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
- --without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo \
+ --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
--disable-gnutls --without-dnsupdate --without-ads --without-ldap
HOST_CONFIGURE_VARS += python_LDFLAGS="" python_LIBDIR=""
else
CONFIGURE_ARGS += --without-acl-support
endif
-#BUG: We fail to get a wortking "python embedded interpreter" for AD_DC mode, seems mixed host/target libs.
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
- TARGET_CFLAGS := -I$(PYTHON3_INC_DIR) $(TARGET_CFLAGS)
+ TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/python2.7 $(TARGET_CFLAGS)
else
- CONFIGURE_ARGS += --without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo --nopycache \
+ CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
--disable-gnutls --without-dnsupdate --without-ads --without-ldap
CONFIGURE_VARS += \
python_LDFLAGS="" \
CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace
# CONFIGURE_ARGS += --disable-symbol-versions
-define Host/Configure
- if [ $(CONFIG_SAMBA4_SERVER_AD_DC) = "y" ]; then \
- echo "Config error: SAMBA4_SERVER_AD_DC config option is broken atm!"; \
- echo "Last AD_DC version that builds is here: https://github.com/Andy2244/openwrt-extra/tree/samba-4.9 "; \
- exit 1; \
- fi
- $(call Host/Configure/Default)
-endef
-
define Host/Compile
(cd $(HOST_BUILD_DIR); \
./buildtools/bin/waf build \
endef
# BUG: We need to use "waf install --targets=" otherwise a "make install" or "waf install" will retrigger a full recompile of all possible targets!
-# BUG: Samba4-10 "waf install --destdir" is not working, bins are not installed!
define Build/Compile
(cd $(PKG_BUILD_DIR); \
./buildtools/bin/waf install \
define Package/samba4-libs/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) -L $(PKG_BUILD_DIR)/bin/shared/*.so* $(1)/usr/lib/
- $(CP) -L $(PKG_BUILD_DIR)/bin/shared/private/*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/samba/vfs $(1)/usr/lib/samba/idmap $(1)/usr/lib/samba/ldb $(1)/usr/lib/samba/krb5
- if [ -d $(PKG_BUILD_DIR)/bin/modules/idmap ]; then \
- $(CP) -L $(PKG_BUILD_DIR)/bin/modules/idmap $(1)/usr/lib/samba/; \
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
fi
- if [ -d $(PKG_BUILD_DIR)/bin/modules/vfs ]; then \
- $(CP) -L $(PKG_BUILD_DIR)/bin/modules/vfs $(1)/usr/lib/samba/; \
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
fi
- if [ -d $(PKG_BUILD_DIR)/bin/modules/krb5 ]; then \
- $(CP) -L $(PKG_BUILD_DIR)/bin/modules/krb5 $(1)/usr/lib/samba/; \
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/krb5 ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/krb5 $(1)/usr/lib/samba/; \
fi
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- $(INSTALL_DIR) $(1)/usr/lib/python3
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/python3 $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/python2.7
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
endif
endef
define Package/samba4-client/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{smbclient,cifsdd} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbclient,cifsdd} $(1)/usr/bin/
endef
define Package/samba4-admin/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/eventlogadm $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/eventlogadm $(1)/usr/sbin/
endef
define Package/samba4-utils/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{smbstatus,smbtree,smbget,mvxattr,nmblookup} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbstatus,smbtree,smbget,mvxattr,nmblookup} $(1)/usr/bin/
endef
define Package/samba4-server/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/smbd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+ # waf does not install those?
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil} $(1)/usr/bin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/nmbd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/wbinfo $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/winbindd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wbinfo $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/winbindd $(1)/usr/sbin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/sharesec $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sharesec $(1)/usr/bin/
endif
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/samba $(1)/etc/init.d
$(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba4
+++ /dev/null
-From a197e0cafb276a9b732f914b1f679ebb487b47f1 Mon Sep 17 00:00:00 2001
-Date: Tue, 19 Mar 2019 20:46:27 +0800
-Subject: [PATCH] cross_compile argument doesn't apply
-
-reproduce:
- ./configure --cross-compile --cross-answers=XXX
-
-The output log now will show correct cross-answers.
----
- third_party/waf/waflib/Context.py | 20 ++++++++++++++++++--
- third_party/waf/waflib/Tools/c_config.py | 11 +++++++----
- 2 files changed, 25 insertions(+), 6 deletions(-)
-
-diff --git a/third_party/waf/waflib/Context.py b/third_party/waf/waflib/Context.py
-index 3222fb1551c..d1c87512095 100644
---- a/third_party/waf/waflib/Context.py
-+++ b/third_party/waf/waflib/Context.py
-@@ -359,8 +359,16 @@ class Context(ctx):
-
- encoding = kw.pop('decode_as', default_encoding)
-
-+ exec_args = kw.pop('exec_args', [])
-+ if isinstance(cmd, str):
-+ cmd = [cmd] + exec_args
-+ elif isinstance(cmd, list):
-+ cmd = cmd + exec_args
- try:
-- ret, out, err = Utils.run_process(cmd, kw, cargs)
-+ if exec_args:
-+ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
-+ else:
-+ ret, out, err = Utils.run_process(cmd, kw, cargs)
- except Exception as e:
- raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
-
-@@ -438,8 +446,16 @@ class Context(ctx):
-
- encoding = kw.pop('decode_as', default_encoding)
-
-+ exec_args = kw.pop('exec_args', [])
-+ if isinstance(cmd, str):
-+ cmd = [cmd] + exec_args
-+ elif isinstance(cmd, list):
-+ cmd = cmd + exec_args
- try:
-- ret, out, err = Utils.run_process(cmd, kw, cargs)
-+ if exec_args:
-+ ret, out, err = Utils.run_regular_process(cmd, kw, cargs)
-+ else:
-+ ret, out, err = Utils.run_process(cmd, kw, cargs)
- except Exception as e:
- raise Errors.WafError('Execution failure: %s' % str(e), ex=e)
-
-diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
-index 76082152cd9..25e468b0844 100644
---- a/third_party/waf/waflib/Tools/c_config.py
-+++ b/third_party/waf/waflib/Tools/c_config.py
-@@ -660,20 +660,23 @@ class test_exec(Task.Task):
- """
- color = 'PINK'
- def run(self):
-+ exec_args = Utils.to_list(self.generator.exec_args)
-+
- if getattr(self.generator, 'rpath', None):
- if getattr(self.generator, 'define_ret', False):
-- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
-+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], exec_args=exec_args)
- else:
-- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
-+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], exec_args=exec_args)
- else:
- env = self.env.env or {}
- env.update(dict(os.environ))
- for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
- env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
-+
- if getattr(self.generator, 'define_ret', False):
-- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
-+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env, exec_args=exec_args)
- else:
-- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
-+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env, exec_args=exec_args)
-
- @feature('test_exec')
- @after_method('apply_link')
---
-2.17.1
-